#include "GameServerInfo.h"
#include "../Game.h"

GameServerInfo::GameServerInfo()
	:m_id(0),
	m_count(0),
	m_name(""),
	m_ip(""),
    m_port(0)
{
	//ctor
}

GameServerInfo::~GameServerInfo()
{
	//dtor
}

GameServerInfo::GameServerInfo(const GameServerInfo& other)
	:m_id(other.m_id),
	m_count(other.m_count),
	m_name(other.m_name),
	m_ip(other.m_ip),
    m_port(other.m_port)
{

}


void GameServerInfo::Init()
{
	Debug::Log("GameServerInfo::Init()");
	m_id = std::atoi(Config::globalConfig_map["GameServerID"].c_str());
	m_name = Config::globalConfig_map["GameServerName"];
	m_count = Game::GetInstance().GetSock().GetClientList().size();

	m_ip =  Game::GetInstance().GetSock().GetIp();
    m_port = Game::GetInstance().GetSock().GetPort();
}
